Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reslove the error that 'interface' cannot be used as an identifi… #31041

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

happyhyep
Copy link

Summary

export type Container =
  | interface extends Element {_reactRootContainer?: FiberRoot}
  | interface extends Document {_reactRootContainer?: FiberRoot}
  | interface extends DocumentFragment {_reactRootContainer?: FiberRoot};

The error 'interface' cannot be used as an identifier in strict mod appears in the code above.

image

So I corrected it with the code below, and the error does not occur anymore.

export type Container =
  | (Element & {_reactRootContainer?: FiberRoot})
  | (Document & {_reactRootContainer?: FiberRoot})
  | (DocumentFragment & {_reactRootContainer?: FiberRoot});

How did you test this change?

Since the UI is not a changed operation, I ran the yarn test and I was able to confirm that it runs without any problems. And the error message is no longer displayed in intelij IDE.

image

Copy link

vercel bot commented Sep 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 24, 2024 5:56am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants